<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
	
<rich:panel header="#{messages['voucher.mgmt.label']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>

	<h:panelGrid width="100%">
		<h:panelGroup>
		    <h:outputText value="#{messages['voucher.generation.label']}" styleClass="sub_header" />
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="product1" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="product1" value="#{messages['voucher.product.1.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="product1" styleClass="standardText" value="" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>	
		
		<h:outputLabel for="product2" value="#{messages['voucher.product.2.label']}" styleClass="standardText_Label" />
		<h:panelGroup>
			<t:selectOneMenu id="product2" styleClass="standardText" value="">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputLabel for="product3" value="#{messages['voucher.product.3.label']}" styleClass="standardText_Label" />
		<h:panelGroup>
			<t:selectOneMenu id="product3" styleClass="standardText" value="">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputLabel for="product4" value="#{messages['voucher.product.3.label']}" styleClass="standardText_Label" />
		<h:panelGroup>
			<t:selectOneMenu id="product4" styleClass="standardText" value="">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputLabel for="product5" value="#{messages['voucher.product.3.label']}" styleClass="standardText_Label" />
		<h:panelGroup>
			<t:selectOneMenu id="product5" styleClass="standardText" value="">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="noOfPerson" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noOfPerson" value="#{messages['voucher.no.of.person.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="noOfPerson" required="true" size="3" maxlength="3" styleClass="standardText" value="1"></t:inputText>
		</h:panelGroup>
	
		<h:outputText></h:outputText>
		<t:message for="noOfNights" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noOfNights" value="#{messages['voucher.no.of.nights.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="noOfNights" required="true" size="3" maxlength="3" styleClass="standardText" value="1"></t:inputText>
		</h:panelGroup>			
		
		<h:outputText></h:outputText>
		<t:message for="noOfVoucher" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="noOfVoucher" value="#{messages['voucher.no.of.voucher.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="noOfVoucher" required="true" size="3" maxlength="3" styleClass="standardText" value="10"></t:inputText>
		</h:panelGroup>
		
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="effectiveDate" value="#{messages['effective.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    	<t:inputCalendar
		    	id="effectiveDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value=""
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>
		
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="expiryDate" value="#{messages['expiry.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    	<t:inputCalendar
		    	id="expiryDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value=""
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>
	</t:panelGrid>					
	
	<rich:spacer height="10"></rich:spacer>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:panelGrid columns="2">
			<h:commandButton value="#{messages['generate']}" styleClass="button"></h:commandButton>
			<h:commandButton value="#{messages['back']}" styleClass="button"></h:commandButton>
		</t:panelGrid>
	</t:panelGrid>
</rich:panel>	